import { ShaderMaterial, ShaderMaterialParameters } from "../../thirdparty/three/imports";
import { Material3D } from "./Material3D";

export interface ShaderMaterial3D
{
    get _material(): ShaderMaterial;
    set _material(v: ShaderMaterial);
}

export class ShaderMaterial3D extends Material3D
{
    get vertexShader()
    {
        return this._material.vertexShader;
    }
    set vertexShader(v)
    {
        this._material.vertexShader = v;
    }
    get fragmentShader()
    {
        return this._material.fragmentShader;
    }
    set fragmentShader(v)
    {
        this._material.fragmentShader = v;
    }

    get uniforms()
    {
        return this._material.uniforms;
    }
    set uniforms(v)
    {
        this._material.uniforms = v;
    }

    constructor(parameters?: ShaderMaterialParameters)
    {
        super();
        this._material = new ShaderMaterial(parameters);
    }
}
